package cn.edu.hnu.gpg.dto;

import cn.edu.hnu.gpg.entity.Message;

public class MessageWithName extends Message {

    private String fromUserName;
    private String toUserName;

    public MessageWithName() {}

    public MessageWithName(Message message) {
        if (message == null)
            return;

        this.setMessageId(message.getMessageId());
        this.setFromUserId(message.getFromUserId());
        this.setToUserId(message.getToUserId());
        this.setContent(message.getContent());
        this.setSendTime(message.getSendTime());
        this.setStatus(message.getStatus());
    }

    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }

    public String getFromUserName() {
        return fromUserName;
    }

    public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }

    public String getToUserName() {
        return toUserName;
    }
}
